@extends('backend::layout')
@section('title',$page_title)
@section('content')
            @component('backend::component.form.form')
                @slot('page_title') {{$page_title}} @endslot
                @slot('formId') admin-form @endslot
                @slot('action') {{route('b_Admin_save')}} @endslot

                @component('backend::component.form.form-group')
                    @slot('title') 管理员名 @endslot
                    @component('backend::component.form.input')
                        @slot('name') admin_name @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 邮箱 @endslot
                    @component('backend::component.form.input')
                        @slot('name') admin_email @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 手机号 @endslot
                    @component('backend::component.form.input')
                        @slot('name') admin_mobile @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 登录密码 @endslot
                    @component('backend::component.form.input-group')
                        @slot('input')
                            @component('backend::component.form.input')
                                @slot('name') login_pwd @endslot
                                @slot('type') password @endslot
                            @endcomponent
                        @endslot
                        @slot('button')
                            @component('backend::component.form.button')
                                @slot('title') 随机生成 @endslot
                                @slot('size') sm @endslot
                                @slot('attr') onclick = randVal(this,8) data-target=login_pwd @endslot
                            @endcomponent
                        @endslot
                    @endcomponent
                    @slot('remark') 必须至少包含一个大写字母，一个小写字母,一个特殊字符 @endslot
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 确认登录密码 @endslot
                    @component('backend::component.form.input')
                        @slot('name') confirm_login_pwd @endslot
                        @slot('type') password @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 安全密码 @endslot
                    @component('backend::component.form.input-group')
                        @slot('input')
                            @component('backend::component.form.input')
                                @slot('name') safe_pwd @endslot
                                @slot('type') password @endslot
                            @endcomponent
                        @endslot
                        @slot('button')
                            @component('backend::component.form.button')
                                @slot('title') 随机生成 @endslot
                                @slot('size') sm @endslot
                                @slot('attr') onclick = randVal(this,8) data-target=safe_pwd @endslot
                            @endcomponent
                        @endslot
                    @endcomponent
                    @slot('remark') 必须至少包含一个大写字母，一个小写字母,一个特殊字符 @endslot
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 确认安全密码 @endslot
                    @component('backend::component.form.input')
                        @slot('name') confirm_safe_pwd @endslot
                        @slot('type') password @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 状态 @endslot
                    <div>
                        @foreach(['0'=>'禁用','1'=>'启用'] as $value=>$title)
                            @component('backend::component.radio')
                                @slot('title') {{$title}} @endslot
                                @slot('name') status @endslot
                                @slot('value') {{$value}} @endslot
                                @if($value == 1)
                                    @slot('checked') checked @endslot
                                @endif
                            @endcomponent
                        @endforeach
                    </div>
                @endcomponent
                @if($roles)
                    @component('backend::component.form.form-group')
                        @slot('title') 分配角色 @endslot
                        <div>
                            @foreach($roles as $id=>$title)
                                @component('backend::component.checkbox')
                                    @slot('title') {{$title}} @endslot
                                    @slot('name') my_roles[] @endslot
                                    @slot('value') {{$id}} @endslot
                                @endcomponent
                            @endforeach
                        </div>
                    @endcomponent
                @endif
                @slot('buttons')
                    @component('backend::component.form.button')
                        @slot('title') 提交 @endslot
                        @slot('size') sm @endslot
                        @slot('params') {"formId":"#admin-form"} @endslot
                        @slot('class') btn-min-width ajax-form @endslot
                    @endcomponent
                    @component('backend::component.form.button')
                        @slot('title') 重置 @endslot
                        @slot('type') reset @endslot
                        @slot('size') sm @endslot
                        @slot('color') danger @endslot
                        @slot('class') btn-min-width @endslot
                    @endcomponent
                @endslot
            @endcomponent
@endsection